package com.qlslylq.ad_x_sdk.factory;

import android.content.Context;

import com.qlslylq.ad_x_sdk.view.SplashAdView;

import java.util.Map;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.StandardMessageCodec;
import io.flutter.plugin.platform.PlatformViewFactory;

/**
 * created by qlslylq <br/>
 * on 2022/5/23 <br/>
 */
public class SplashAdViewFactory extends PlatformViewFactory {

    private final BinaryMessenger messenger;

    private final Context context;

    public SplashAdViewFactory(Context context, BinaryMessenger messenger) {
        super(StandardMessageCodec.INSTANCE);
        this.context = context;
        this.messenger = messenger;
    }

    public SplashAdView create(Context context, int viewId, Object args) {
        Map<String, Object> req = (Map<String, Object>) args;
        return new SplashAdView(this.context, messenger, viewId, req);
    }

}